/*
 * encoder.c
 *
 *  Created on: Sep 12, 2025
 *      Author: lianz
 */

#include "stm32f1xx_hal.h"

int Read_Speed(TIM_HandleTypeDef *htim)
{
	int temp;
	temp = (short)__HAL_TIM_GetCounter(htim);
	__HAL_TIM_SetCounter(htim, 0);
	return temp;
}
